#pragma once

#include "loirey_GLOBAL.h"
#include "loirey_BasicStructure.h"
#include "loirey_MyMath.h"

using namespace loirey;

namespace loirey
{
	class CPoint_2D_Double
	{
	public:
		double x, y;

	public:
		CPoint_2D_Double(double v = 0.0)
		{
			myInit(v);
		}
		CPoint_2D_Double(double vx, double vy)
		{
			myInit(vx, vy);
		}
		void myInit(double v = 0.0)
		{
			x = y = v;
		}
		void myInit(double vx, double vy)
		{
			x = vx;
			y = vy;
		}
	};

	class CGeometry
	{
	public:
		class CPolygon
		{
		public:
			// -1: in
			// +0: on
			// +1: out
			static int InOnOut(const CPoint_2D_Double& p, const CSimpleTypeArray<CPoint_2D_Double>& P);
		};
	};
};

